Xbasic
SQL::SchemaTableNumber Method
Syntax
Index as N = TableNumber(Name as C)
Arguments
- Index
The number of the table. Returns -1 if the table name is not in the list.
- SQL::Schema
A SQL::Schema object created with a DIM statement.
- Name
Character
Description
Get the index of a Table from the name.
Discussion
The SQL::Schema.TableNumber() method returns the subscript index of the requested table name in the table array property.
Example
dim conn as SQL::Connection
dim sch as SQL::Schema
connString = "{A5API='Access', FileName='c:\program files\a5v8\mdbfiles\alphasports.mdb'}"
if .not. conn.open(connString)
ui_msg_box("Error", conn.CallResult.text)
end
end if
if .not. conn.GetSchema(sch) then
ui_msg_box("Error", conn.CallResult.text)
conn.close()
end
end if
ui_msg_box("Table Number", "" + sch.TableNumber("Invoice_Header"))
conn.close()See Also